package org.dulong.interceptor;

import org.springframework.aop.MethodBeforeAdvice;

import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Arrays;

/**
 * Created with IntelliJ IDEA.
 * User: Administrator
 * Date: 13-9-23
 * Time: 上午11:27
 * To change this template use File | Settings | File Templates.
 */
public class MethodBeforeAdviceImpl implements MethodBeforeAdvice {
    @Override
    public void before(Method method, Object[] objects, Object o) throws Throwable {
        System.out.println("运行前检查");
        System.out.println("Method:" + method.getName());
        System.out.println("Args: " + Arrays.asList(objects));
        System.out.println("Object: " + o);
    }
}
